<include file="public@header" />
</head>
<body>
	<div class="layui-fluid">
		<form method="post" class="layui-form js-ajax-form margin-top-20" action="{:url('courseclass/addPost')}">
			<div class="layui-form-item">
				<label for="input-name" class="layui-form-label"><span class="form-required">*</span>名称</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" id="input-name" name="name">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label"><span class="form-required">*</span>图标</label>
				<div class="layui-input-block">
					<input type="hidden" name="thumb" id="thumb" value="">
					<a href="javascript:uploadOneImage('图片上传','#thumb');">
						<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumb-preview"
							 style="cursor: pointer;max-width:150px;max-height:150px;"/>
					</a>
					<div class="layui-col-md12" style="margin-top: 10px">
						<input type="button" class="layui-btn layui-btn-sm layui-btn-normal"
							   onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
							   value="取消图片"> 建议尺寸： 100 X 100
					</div>
				</div>
			</div>

            
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button type="submit" class="layui-btn js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
            
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/js/wind.js"></script>

	<script>
        (function(){            
            $('.btn-cancel-thumbnail').click(function () {
                $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail').val('');
            });
        })()
    </script>
</body>
</html>